package com.oauth.service;

import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
import org.apache.oltu.oauth2.common.token.BasicOAuthToken;

/**
 * oauth2服务接口定义
 * Created by yangjianbo on 2016/9/24.
 */
public interface OauthAuthorizeService {


   String authorizeByCode(String client_id,String redict_uri,String scope) throws OAuthSystemException, OAuthProblemException;

   BasicOAuthToken authorizeByToken(String client_id,String redict_uri,String scope) throws OAuthSystemException, OAuthProblemException;
   /**
    * 判定是否给客户端授权
    * @param client_id
    * @param scope
    * @return
     */
   Boolean checkAuth(String client_id,String scope);

}
